package com.future.common.api.admin.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.diboot.core.binding.annotation.BindEntityList;
import com.future.common.api.admin.entry.SysRole;
import com.future.common.api.admin.entry.SysUser;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * @ClassName : SysUserVO
 * @Author : lby
 * @Date: 2021/3/12 14:39
 * @Description :
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class SysUserVO extends SysUser {

    /**
     * 学校id
     */
    private Integer tenantId;


    /**
     * 登陆验证码
     */
    private Integer code;


    /**
     * 用户权限
     */
    String[] permissionList;


    /**
     * 性别
     */
    private String sexName;

    private Boolean alwaysShow;



    @TableField(exist = false)
    @BindEntityList(entity = SysRole.class, condition="this.id=sys_user_role.user_id AND sys_user_role.role_id=id")
    private List<SysRole> sysRoleList;
}
